<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ page import="com.zhouchao.bean.Admin"%>
<%@ page import="com.zhouchao.bean.DormManager"%>
<%@ page import="com.zhouchao.bean.Student"%>
<%
Object t =request.getSession().getAttribute("currentUser"); 
	 	if(t==null){
		
		out.println("<script type='text/javascript'>alert('ERROR 登录已失效，请重新登录');</script>"); 
		//response.sendRedirect("../error");
		}

%>
<html lang="zh">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<title>宿舍管理系统</title>
		<link href="${pageContext.request.contextPath}/style/dorm.css"
			rel="stylesheet">
		<link
			href="${pageContext.request.contextPath}/bootstrap/css/bootstrap.css"
			rel="stylesheet">
		<link
			href="${pageContext.request.contextPath}/bootstrap/css/bootstrap-responsive.css"
			rel="stylesheet">
		<link
			href="${pageContext.request.contextPath}/bootstrap-datetimepicker-master/css/bootstrap-datetimepicker.min.css"
			rel="stylesheet" media="screen">
		<link rel="stylesheet" type="text/css"
			href="http://sandbox.runjs.cn/uploads/rs/238/n8vhm36h/dataTables.bootstra.css">
		<script type="text/javascript"
			src="http://sandbox.runjs.cn/uploads/rs/238/n8vhm36h/jquery.js"></script>
		<script type="text/javascript"
			src="http://sandbox.runjs.cn/uploads/rs/238/n8vhm36h/jquery.dataTables.js"></script>
		<script type="text/javascript"
			src="http://sandbox.runjs.cn/uploads/rs/238/n8vhm36h/bootstrap.min.js"></script>
		<script type="text/javascript"
			src="http://sandbox.runjs.cn/uploads/rs/238/n8vhm36h/dataTables.bootstrap.js"></script>
		<script type="text/javascript"
			src="${pageContext.request.contextPath}/bootstrap-datetimepicker-master/js/bootstrap-datetimepicker.js"
			charset="UTF-8"></script>
		<script type="text/javascript"
			src="${pageContext.request.contextPath}/bootstrap-datetimepicker-master/js/locales/bootstrap-datetimepicker.fr.js"
			charset="UTF-8"></script>
		<script
			src="${pageContext.request.contextPath}/bootstrap/js/bootstrap.js"></script>

	<script type="text/javascript">
		
			function disptime(){
var today = new Date(); //获得当前时间

var y=today.getFullYear();
var m=today.getMonth()+1;
var dd=today.getDate();
var hh = today.getHours(); //获得小时、分钟、秒
var mm = today.getMinutes();
var ss = today.getSeconds();

 if(hh<10) hh="0"+hh;
         	if(mm<10) mm="0"+mm;
         	if(ss<10) ss="0"+ss;
/*设置div的内容为当前时间*/
document.getElementById("myclock").innerHTML="今天是："+y+"年"+m+"月"+dd+"日"+hh+":"+mm+":"+ss+"";
/*
使用setTimeout在函数disptime()体内再次调用setTimeout
设置定时器每隔1秒（1000毫秒），调用函数disptime()执行，刷新时钟显示
*/
var myTime=setTimeout("disptime()",1000);
}    
	$(document).ready(function() {
		$("#DataTables_Table_0_wrapper .row-fluid").remove();
	});
	
</script>
		<style type="text/css">
.bs-docs-sidenav {
	background-color: #fff;
	border-radius: 6px;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.067);
	padding: 0;
	width: 228px;
}

.bs-docs-sidenav>li>a {
	border: 1px solid #e5e5e5;
	display: block;
	padding: 8px 14px;
	margin: 0 0 -1px;
}

.bs-docs-sidenav>li:first-child>a {
	border-radius: 6px 6px 0 0;
}

.bs-docs-sidenav>li:last-child>a {
	border-radius: 0 0 6px 6px;
}

.bs-docs-sidenav>.active>a {
	border: 0 none;
	box-shadow: 1px 0 0 rgba(0, 0, 0, 0.1) inset, -1px 0 0
		rgba(0, 0, 0, 0.1) inset;
	padding: 9px 15px;
	position: relative;
	text-shadow: 0 1px 0 rgba(0, 0, 0, 0.15);
	z-index: 2;
}

.bs-docs-sidenav .icon-chevron-right {
	float: right;
	margin-right: -6px;
	margin-top: 2px;
	opacity: 0.25;
}

.bs-docs-sidenav>li>a:hover {
	background-color: #f5f5f5;
}

.bs-docs-sidenav a:hover .icon-chevron-right {
	opacity: 0.5;
}

.bs-docs-sidenav .active .icon-chevron-right,.bs-docs-sidenav .active a:hover .icon-chevron-right
	{
	background-image: url("../img/glyphicons-halflings-white.png");
	opacity: 1;
}
</style>

	</head>
	<body onload="disptime()">
		<div class="container-fluid"
			style="padding-right: 0px; padding-left: 0px;">
			<div align="justify"
				style="height: 92px; background-image: url('images/bg.jpg')">
				<div align="left" style="width: 80%;height:80px ;float: left;padding-top: 50px;padding-left: 30px;" >
		<font color="white" size="6" >宿舍管理系统</font>
		<span  >
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;当前用户：&nbsp;<font color="red" >${currentUser.userName }</font>  &nbsp;&nbsp;&nbsp;&nbsp;<span id="myclock"></span>
	 
	</span>
		
		</div>
		
		
				
				</div>
	
			</div>
		
		<div class="container-fluid">
			<div class="row-fluid">
				<div class="span2 bs-docs-sidebar">
					<ul class="nav nav-list bs-docs-sidenav">
						<li>
							<a href="blank"><i class="icon-chevron-right"></i>首页</a>
						</li>
						
						
						
						<li>
							<a href="dormManager?action=list"><i
								class="icon-chevron-right"></i>宿舍管理员管理</a>
						</li>
						<li>
							<a href="student?action=list"><i class="icon-chevron-right"></i>学生管理</a>
						</li>
						<li>
							<a href="dormBuild?action=list"><i class="icon-chevron-right"></i>宿舍楼管理</a>
						</li>
						<li>
							<a href="record?action=list"><i class="icon-chevron-right"></i>缺勤记录</a>
						</li>
						
						<li>
							<a href="password?action=preChange"><i
								class="icon-chevron-right"></i>修改密码</a>
						</li>
						<li>
							<a href="exit"><i class="icon-chevron-right"></i>退出系统</a>
						</li>
					</ul>
				</div>
				<div class="span10">
					<jsp:include page="${mainPage==null?'admin/blank.jsp':mainPage}"></jsp:include>
				</div>
			</div>
		</div>
	</body>
</html>